<?php

namespace App\Http\Controllers\home;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Banner;
use App\Product;
use App\Cases;
class IndexController extends Controller
{
    public function index(){
        $banners = Banner::where('entitle','=','indexbanner')->first();
        $product=Product::OrderBy('created_at','desc')->where('isshow',1)->take(4)->get();
        $case=Cases::OrderBy('created_at','desc')->take(4)->get();
        return view('home.index.index',compact('banners','product','case'));
    }
}
